#ifndef FS_STORAGE_H
#define FS_STORAGE_H

#include <istorage.h>

namespace fspersistence
{
class FsStorage : public core::IStorage
{
public:  
    QByteArray read(const QSharedPointer<core::IPersistentDocument>&
        document) const;
    void write(const QSharedPointer<core::IPersistentDocument>&
        document) const;
    bool create(
        const QUrl& url) const;
    bool erase(const QSharedPointer<core::IPersistentDocument>&
        document) const;

    bool exists(
        const QUrl& url) const;

    QString registeredName() const;
    QString name() const;

    QUrl urlForSave(const QString& proposedName,
        const core::MimeType& mimeType, bool& canceled) const;
    QUrl urlForOpen(const core::MimeType& mimeType) const;

    bool operator==(const IStorage& storage) const;

protected:
    core::IStorage* copy() const;
};

} // namespace fspersistence

#endif
